package io.mqttpush.mqttserver.handles;

import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.mqtt.MqttMessage;

import java.util.List;

/**
 * @author tianzhenjiu
 * @date 2020/6/9 17:16
 */
public interface Iservice<T> {



    /**
     * 判断是否接受这种报文
     * @param channel
     * @param inMessage
     * @return
     */
    boolean accept(ChannelHandlerContext channel,MqttMessage inMessage);
    /**
     * 服务
     * @param channelHandlerContext
     * @param outMessage
     * @param inMessage
     * @return
     */
    List<Object> service(ChannelHandlerContext channelHandlerContext, List<Object> outMessage, T  inMessage);
}
